﻿using System;
using System.Collections.Generic;
using Utility.Enums;

namespace Model.PageModel
{
    class IndexMod
    {
    }

    public class PayInfo
    {
        public decimal SumPrice { get; set; } = 0;
        public Int32 RecordCount { get; set; } = 0;
        /// <summary>
        /// 交易状态(1.待支付2.已支付3.已退款4.已撤销5.取消支付6.其他(支付失败))
        /// </summary>

        public Enum_PayStatuss Typ { get; set; }
    }

    public class AllPayInfo
    {
        public Dictionary<Enum_PayStatuss, PayInfo> PayInfs { get; set; } = new Dictionary<Enum_PayStatuss, PayInfo>();
        public Int32 ErrCount { get; set; } = 0;
        public Int32 ExCount { get; set; } = 0;
    }

    public class PayTools
    {
        public Int32 One { get; set; } = 0;
        public Decimal OnePercentage { get; set; } = 0;

        public String OneDescribe { get; } = "一秒以内";
        public Int32 Two { get; set; } = 0;

        public Decimal TwoPercentage { get; set; } = 0;

        public String TwoDescribe { get; } = "一到两秒";

        public Int32 Three { get; set; } = 0;

        public Decimal ThreePercentage { get; set; } = 0;

        public String ThreeDescribe { get; } = "二到三秒";

        public Int32 Four { get; set; } = 0;

        public Decimal FourPercentage { get; set; } = 0;

        public String FourDescribe { get; } = "三到五秒";

        public Int32 Five { get; set; } = 0;

        public Decimal FivePercentage { get; set; } = 0;

        public String FiveDescribe { get; } = "五秒以上";

        public Decimal Count { get; set; } = 0;

        public void CalculationPercentage()
        {
            Count = One + Two + Three + Four + Five;
            OnePercentage = One / Count * 100;
            TwoPercentage = Two / Count * 100;
            ThreePercentage = Three / Count * 100;
            FourPercentage = Four / Count * 100;
            FivePercentage = 100 - OnePercentage - TwoPercentage - ThreePercentage - FourPercentage;

        }
    }

    public class PayLines
    {
        public DateTime PayDate { get; set; }

        public Int32 PayHour { get; set; }

        public Decimal PayMoney { get; set; }

        public Decimal ReturnMoney { get; set; }

        public Int32 PayCount { get; set; }

        public Int32 ReturnCount { get; set; }
    }

    public class PayTop
    {
        public Decimal Result { get; set; }

        public String CpnID { get; set; }

        public String CpnName { get; set; }

        public String OrgID { get; set; }

        public String OrgName { get; set; }
    }
    /// <summary>
    /// 交易核心数据
    /// </summary>
    public class PayCore
    {
        /// <summary>
        /// 交易金额
        /// </summary>
        public string PayMonyStr { get; set; }
        public decimal PayMony { get; set; }
        /// <summary>
        /// 交易笔数
        /// </summary>
        public string PayCountStr { get; set; }
        public decimal PayCount { get; set; }
        /// <summary>
        /// 退款金额
        /// </summary>
        public string RefundMonyStr { get; set; }
        public decimal RefundMony { get; set; }

        /// <summary>
        /// 退款笔数
        /// </summary>
        public string RefundCountStr { get; set; }
        public decimal RefundCount { get; set; }
        /// <summary>
        /// 异常金额
        /// </summary>
        public string ErrMonyStr { get; set; }
        public decimal ErrMony { get; set; }
        /// <summary>
        /// 异常笔数
        /// </summary>
        public string ErrCountStr { get; set; }
        public decimal ErrCount { get; set; }
    }
    /// <summary>
    /// 支付金额排行
    /// </summary>
    public class PayTopCircle
    {
        public decimal value { get; set; }
        public Enum_ChannelType name { get; set; }
    }
}
